package my.senix.sc.controller;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by lhs on 2018/11/6.
 */
@ControllerAdvice("my.senix.sc.controller")
public class ControllerAdvisor {

    @ExceptionHandler(Exception.class)
    @ResponseBody
    public String handle(Exception e){


        return e.getMessage();
    }

}
